//下载express  npm i express -S
const express = require('express')
const router = require('./router')
const cors = require('cors')
const app = express()

app.use(cors())
app.use(express.urlencoded({ extended: false }));

app.use(function (req, res, next) {
    res.header('Access-Control-Allow-Origin', '*');
    res.header('Access-Control-Allow-Methods', '*');
    next();
});

app.use(router)


app.listen(80, () => console.log(`Server running at  http://127.0.0.1`))

